package com.libbase;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.alibaba.android.arouter.launcher.ARouter;
import com.base.activity.BaseActivity;
import com.libbase.activity.AnimationActivity;
import com.libbase.activity.MirrorActivity;
import com.libbase.activity.NyqfActivity;
import com.libbase.activity.PaintTextActivity;
import com.libbase.activity.SnapActivity;
import com.libbase.activity.TestAnimCanvasActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends BaseActivity {

    @BindView(R.id.bt_toanim)
    Button btToanim;
    @BindView(R.id.bt_tovpfragment)
    Button btTovpfragment;
    @BindView(R.id.bt_tosnap)
    Button btTosnap;
    @BindView(R.id.bt_mirror)
    Button btMirror;
    @BindView(R.id.bt_paint)
    Button btPaint;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        ButterKnife.bind(this);
    }

    @Override
    protected void release() {

    }

    @OnClick({R.id.bt_toanim, R.id.bt_tovpfragment, R.id.bt_tosnap, R.id.bt_mirror, R.id.bt_paint,
            R.id.bt_qqpoint, R.id.bt_mvp, R.id.bt_mvp_kotlin, R.id.bt_mvvm_kotlin})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.bt_toanim: // 低内存帧动画
                AnimationActivity.startActivity(mContext);
                break;
            case R.id.bt_tovpfragment: //mvc
                NyqfActivity.startActivity(mContext);
                break;
            case R.id.bt_mvp:
                ARouter.getInstance().build(ARouterUrl.ACTIVITY_NYQF_MVP).navigation(this);
                break;
            case R.id.bt_mvp_kotlin:
                ARouter.getInstance().build(ARouterUrl.ACTIVITY_NYQF_MVP_KOTLIN).navigation(this);
                break;
            case R.id.bt_mvvm_kotlin:
                ARouter.getInstance().build(ARouterUrl.ACTIVITY_NYQF_MVVM_KOTLIN).navigation(this);
                break;
            case R.id.bt_tosnap:
                SnapActivity.startActivity(mContext);
                break;
            case R.id.bt_mirror:
                MirrorActivity.startActivity(mContext);
                break;
            case R.id.bt_paint:
                PaintTextActivity.startActivity(mContext);
                break;
            case R.id.bt_qqpoint:
                TestAnimCanvasActivity.startActivity(mContext);
                break;
            default:
                break;
        }
    }

}
